Skip to content

Refuse a class over a type the catalog keeps out of the object layer - #71

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:gen/read-binding-scope
Nov 16, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:gen/read-binding-scope

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

tools/objectgen.py stops before emitting the types layer when a class of
the catalog's object model wraps a C type whose typeEncodings entry
carries bindingScope: host for the time types a binding casts to its
language's own, none for numeric, box2d and box3d, which no binding
carries. MEOS-API refuses such a class when it derives the catalog
(check_scope_classes); the generator reads the same mark, so a catalog
from another derivation cannot hand C# one.

Witness. Over the catalog of MobilityDB master af86409853 with a leaf
Numeric under Value and its class over NumericData added to the object
model, the shape the catalog held before numeric left binding scope,
objectgen exits 1 with "classes over types out of the object layer:
Numeric (NumericData, bindingScope none)"; over that catalog as derived
it emits 154 classes and 5191 methods, 0 deferred, and the generated
tree equals main's.

Why. The owner ruled the time types host types and numeric, box2d and
box3d out of binding scope; the catalog states the ruling once, in
bindingScope, and each generator reads it rather than a list of its own.

Measured over the catalog of MobilityDB master af86409853 and MEOS-API
master ea8305118a: tools/codegen.py and tools/objectgen.py leave
MEOS.NET/ and GAP-LEDGER.md byte-identical to main.

tools/objectgen.py stops before emitting the types layer when a class of
the catalog's object model wraps a C type whose typeEncodings entry
carries bindingScope: host for the time types a binding casts to its
language's own, none for numeric, box2d and box3d, which no binding
carries. MEOS-API refuses such a class when it derives the catalog
(check_scope_classes); the generator reads the same mark, so a catalog
from another derivation cannot hand C# one.

Witness. Over the catalog of MobilityDB master af86409853 with a leaf
Numeric under Value and its class over NumericData added to the object
model, the shape the catalog held before numeric left binding scope,
objectgen exits 1 with "classes over types out of the object layer:
Numeric (NumericData, bindingScope none)"; over that catalog as derived
it emits 154 classes and 5191 methods, 0 deferred, and the generated
tree equals main's.

Why. The owner ruled the time types host types and numeric, box2d and
box3d out of binding scope; the catalog states the ruling once, in
bindingScope, and each generator reads it rather than a list of its own.

Measured over the catalog of MobilityDB master af86409853 and MEOS-API
master ea8305118a: tools/codegen.py and tools/objectgen.py leave
MEOS.NET/ and GAP-LEDGER.md byte-identical to main.
@estebanzimanyi
estebanzimanyi merged commit 359675c into MobilityDB:main Nov 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant